package com.rmb.dataanalysis.verify;

import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.parser.ParserException;
import com.alibaba.druid.sql.parser.SQLParserUtils;
import com.alibaba.druid.sql.parser.SQLStatementParser;
import com.rmb.common.exception.ExceptionCast;
import com.rmb.common.model.response.CommonCode;

import java.util.List;

/**
 * @Author ZhaoMuYang
 * @Date 2021/1/13 21:07
 */
public class SqlFormatUtil {

    public static boolean sqlFormat(String sql) {

        boolean result=true;

        SQLStatementParser parser = null;
        try {
            SQLParserUtils.createSQLStatementParser(sql, "mysql");

        } catch (ParserException e) {
            result=false;
            System.out.println(e.getMessage());
        }
        //statementList.toString()
        return result;
    }

}
